construct_vote_abstain <- function(ranks) {
  cands <- names(ranks[[1]])
  vote <- data.frame(t(combn(cands, 2)))
  names(vote) <- c("C1", "C2")
  vote <- rbind(vote, data.frame(C1 = cands, C2 = cands))
  vote$C1 <- as.character(vote$C1)
  vote$C2 <- as.character(vote$C2)
  out <- NULL
  for (i in c(1:length(ranks))) {
    choice <- rep(NA, nrow(vote))
    for (j in c(1:nrow(vote))) {
      if(!is.na(as.numeric(ranks[[i]][vote$C1[j]])) & !is.na(as.numeric(ranks[[i]][vote$C2[j]]))){
        choice[j] <- ifelse(as.numeric(ranks[[i]][vote$C1[j]]) < as.numeric(ranks[[i]][vote$C2[j]]),
                            vote$C1[j], vote$C2[j])
      }
      else if(is.na(as.numeric(ranks[[i]][vote$C1[j]])) & !is.na(as.numeric(ranks[[i]][vote$C2[j]]))){
        choice[j] <- vote$C2[j]
      } 
      else if(!is.na(as.numeric(ranks[[i]][vote$C1[j]])) & is.na(as.numeric(ranks[[i]][vote$C2[j]]))){
        choice[j] <- vote$C1[j]
      } else if(is.na(as.numeric(ranks[[i]][vote$C1[j]])) & is.na(as.numeric(ranks[[i]][vote$C2[j]]))){
        choice[j] <- NA
      }
    }
    tobind <- cbind(vote, choice)
    tobind$type <- i
    out <- rbind(out, tobind)
  }
  return(out)
}